<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<% String context = request.getContextPath(); %>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>公车管理</title>
    <!-- 新 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.min.css">
    <%--<link rel="stylesheet" href="css/bootstrap.min.css"/>--%>
    <!-- 可选的Bootstrap主题文件（一般不用引入） -->
    <link href="http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap-theme.min.css" rel="stylesheet"
          id="bs-theme-stylesheet">
    <%--<link rel="stylesheet" href="css/bootstrap-theme.min.css"/>--%>
    <link rel="stylesheet" href="css/main-default.css"/>
    <link rel="stylesheet" href="css/map-default.css"/>
    <link rel="stylesheet" href="css/follow-default.css"/>
    <link rel="stylesheet" href="css/menu-bs-slider.css"/>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <%--<script src="js/jquery-1.11.1.min.js"></script>--%>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
    <%--<script src="js/bootstrap.min.js"></script>--%>
    <script src="js/typeahead.jquery.min.js"></script>
    <script src="js/typeahead.bundle.min.js"></script>
    <script src="js/menu-bs-slider.js"></script>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=yuY9OiqB4Gb6KIx1lXz3aWWL"></script>
    <script>
        var CONTEXT = '<%=context %>';
        var IMEI = '${car.carImei}';
        var carsSelect = [];
        carsSelect[0] = {
            carImei: IMEI,
            carNum: '${car.carNum}',
            carModel: '${car.carModel}',
            carId: ${car.carId},
            sectorName: '${car.sectorName}'
        };
        console.log(carsSelect);
    </script>
    <script type="text/javascript" src="js/DateUtil.js"></script>
    <script type="text/javascript" src="js/md5.js"></script>
    <script type="text/javascript" src="js/gpsooSDK.js"></script>
    <script type="text/javascript" src="js/car-common.js"></script>
    <script type="text/javascript" src="js/car-follow.js"></script>
    <script type="text/javascript" src="js/justgage.1.0.1.min.js"></script>
    <script type="text/javascript" src="js/raphael.2.1.0.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="<%=context %>">公车管理</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse navbar-ex1-collapse">
        <ul class="nav navbar-nav">
            <li><a href="#" class="menu-link" menu-link="history-container">行驶记录</a></li>
            <li><a href="#" class="menu-link" menu-link="alert-container">报警记录</a></li>
            <li><a href="#">车辆控制</a></li>
        </ul>
        <ul class="nav navbar-nav navbar-right" style="padding-right:20px">

            <li><a href="#">关于开发</a></li>
        </ul>
    </div>
    <!-- /.navbar-collapse -->
</nav>
<div id="container">
    <div id="alertDiv" class="col-md-3 col-md-offset-9"></div>
    <div id="leftContainer" class="col-xs-12 col-sm-6 col-md-5 col-lg-3 panel panel-default container slider-container">
        <div class="row slider-item slider-father" style="padding-top: 20px;" id="father-container">
            <div class="col-xs-10 col-sm-10 col-md-10 col-xs-offset-1 col-xs-offset-1 col-md-offset-1">
                <div class="text-left">
                    <small>车辆信息</small>
                </div>
                <div class="text-center page-header"><h2>${car.carNum}</h2></div>
                <div id="g1" class="center-block col-xs-12 col-sm-12 col-md-12 "></div>
                <table class="table table-hover">
                    <tr>
                        <td>型号</td>
                        <td>${car.carModel}</td>
                    </tr>
                    <tr>
                        <td>所属部门</td>
                        <td>${car.sectorName}</td>
                    </tr>
                    <tr>
                        <td>IMEI</td>
                        <td>${car.carImei}</td>
                    </tr>
                    <tr>
                        <td>车辆等级</td>
                        <td>${car.carRank == 1?"个人用车":"单位用车"}</td>
                    </tr>
                    <tr>
                        <td>当前状态</td>
                        <td id="status-td"></td>
                    </tr>
                </table>
            </div>
            <div class="col-xs-10 col-sm-10 col-md-10 col-xs-offset-1 col-xs-offset-1 col-md-offset-1"
                 style="margin-top:20px;">
                <div class="text-left">
                    <small>行车记录</small>
                </div>
                <table class="table table-hover" style="margin-top: 10px;">
                    <tr>
                        <td width="100px">当前位置</td>
                        <td id="address-td"></td>
                    </tr>
                    <tr>
                        <td colspan="2" class="text-center">
                            <button type="button" class="btn btn-link menu-link" menu-link="history-container">查看更多
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="col-xs-10 col-sm-10 col-md-10 col-xs-offset-1 col-xs-offset-1 col-md-offset-1"
                 style="margin-top:20px;">
                <div class="text-left">
                    <small>报警记录</small>
                </div>
                <table class="table table-hover" style="margin-top: 10px;">
                    <tr>
                        <td width="100px">报警记录</td>
                        <td id="alert-td"></td>
                    </tr>
                    <tr>
                        <td colspan="2" class="text-center">
                            <button type="button" class="btn btn-link menu-link" menu-link="alert-container">查看更多
                            </button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="row slider-item slider-hidden" style="padding-top: 20px;" id="history-container">
            <div class="col-xs-10 col-sm-10 col-md-10 col-xs-offset-1 col-xs-offset-1 col-md-offset-1">
                <div class="text-left">
                    <button type="button" class="btn btn-link menu-link show-father-container"
                            menu-link="father-container">主面板
                    </button>
                </div>
                <div class="text-center"><h3>历史记录</h3></div>

                <table class="table table-hover" style="margin-top: 10px;" id="history-table">
                </table>
            </div>
        </div>

        <div class="row slider-item slider-hidden" style="padding-top: 20px;" id="alert-container">
            <div class="col-xs-10 col-sm-10 col-md-10 col-xs-offset-1 col-xs-offset-1 col-md-offset-1">
                <div class="text-left">
                    <button type="button" class="btn btn-link menu-link show-father-container"
                            menu-link="father-container">主面板
                    </button>
                </div>
                <div class="text-center"><h3>报警记录</h3></div>

                <table class="table table-hover" style="margin-top: 10px;" id="alert-table">
                </table>
            </div>

        </div>
    </div>
    <div id="mapDiv" class="col-sm-6 col-md-7 col-lg-9 hidden-xs "></div>

</div>
<div id="bottom">
</div>
</body>

</html>
